﻿@model WebBarracoDoSom.Models.Instrumento

@{
    ViewBag.Title = "Cadastro de Instrumento";
}

<h2>Cadastrar Instrumentos</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Instrumento</legend>
        

        <div class="editor-label">
            @Html.LabelFor(model => model.Nome)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nome)
            @Html.ValidationMessageFor(model => model.Nome)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Marca)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Marca)
            @Html.ValidationMessageFor(model => model.Marca)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Categoria_ID)
        </div>
            @Html.DropDownListFor(model => model.Categoria_ID, new SelectList(WebBarracoDoSom.Models.Categoria.Categorias, "ID", "Nome"))

        <div class="editor-label">
            @Html.LabelFor(model => model.Descricao)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Descricao)
            @Html.ValidationMessageFor(model => model.Descricao)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.Preco)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Preco)
            @Html.ValidationMessageFor(model => model.Preco)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Foto)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Foto)
        </div>      
        
        <p>
            <input type="submit" value="Criar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Voltar para Lista", "SearchIndex")
</div>
